package syntaxAnalysis.core;

public class Production {
	private String left;
	private String right;
	
	public Production(String left, String right) {
		super();
		this.left = left;
		this.right = right;
	}
	public String getLeft() {
		return left;
	}
	public void setLeft(String left) {
		this.left = left;
	}
	public String getRight() {
		return right;
	}
	public void setRight(String right) {
		this.right = right;
	}
	
	public boolean isTerminal(String s){
		boolean result=true;
		char[] c=s.toCharArray();
		for(char i:c){
			if(i>='A'&&i<='Z'){
				result=false;
				break;
			}
		}
		return result;
	}
	
	
	
	@Override
	public String toString() {
		return  left + "->" + right;
	}

}
